package cn.edu.ustc.xrovers.model;

import java.io.Serializable;
import java.sql.Blob;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;



@Entity
@Table
public class Parameter implements Serializable{

	private static final long serialVersionUID = 6313879323678394992L;
	
	private Integer id;
	private Blob cf; //Coefficient类型，将类的内容写入数据库
	private Analyst analyst;
	private Set<Evaluating> evaluatings=new HashSet<Evaluating>();
	
	@ManyToOne
	@JoinColumn(name="Analyst_Id")
	public Analyst getAnalyst() {
		return analyst;
	}
	@Column(name="Par_Data")
	public Blob getCf() {
		return cf;
	}
	@OneToMany(mappedBy="parameter")
	public Set<Evaluating> getEvaluating() {
		return evaluatings;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	public void setAnalyst(Analyst analyst) {
		this.analyst = analyst;
	}
	/*set方法*/
	public void setCf(Blob cf) {
		this.cf = cf;
	}
	
	public void setEvaluating(Set<Evaluating> evaluating) {
		this.evaluatings = evaluating;
	}
	public void setId(Integer id) {
		this.id = id;
	}
}
